<template>
	<view class="con">
		<view v-html="notes"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				notes:""
			}
		},
		onLoad(option) {			
			if(option.xieyi==1){
				
					
				this.gettext(1)
				
			}else if(option.xieyi==2){
				this.gettext(2)
			}
		},
		methods: {
			gettext(type){
				const db = uniCloud.database();
				db.collection('agreement') .where(`type == "${type}"`).get().then(res=>{
					uni.setNavigationBarTitle({
						title:res.result.data[0].title
					})
					this.notes = res.result.data[0].text
				})
			}
		}
	}
</script>

<style>

</style>
